from django.db import models


class headNavigation(models.Model):
    navigationType = models.CharField(max_length=50, verbose_name="导航类型")
    field1 = models.CharField(max_length=50, verbose_name="字段1", null=True, blank=True)
    field2 = models.CharField(max_length=50, verbose_name="字段2", null=True, blank=True)
    field3 = models.CharField(max_length=50, verbose_name="字段3", null=True, blank=True)

    class Meta:
        db_table = 'homeheadnavigation'


class PositionType(models.Model):
    position_type = models.CharField(max_length=50, verbose_name="职位类型")
    sort = models.IntegerField(default=0, verbose_name='排序')
    isdel = models.BooleanField(default=False, verbose_name='是否删除')
    addtime = models.DateTimeField(auto_now_add=True, verbose_name='添加时间')
    jobID = models.IntegerField(verbose_name="职位ID", null=True, blank=True)
    picture = models.CharField(max_length=500, verbose_name="职位图片", null=True, blank=True)
    parent = models.ForeignKey('self', on_delete=models.CASCADE,
                               related_name='children', verbose_name='父级分类', null=True, blank=True)
    field2 = models.CharField(max_length=50, verbose_name="字段2", null=True, blank=True)
    field3 = models.CharField(max_length=50, verbose_name="字段3", null=True, blank=True)
    field4 = models.CharField(max_length=50, verbose_name="字段4", null=True, blank=True)

    class Meta:
        db_table = 'homepositiontype'